import pandas as pd

# 读取CSV文件
df = pd.read_csv("data/compliance_check_badcases.csv")

# 计算is_prohibited为True的比例
is_prohibited_true_ratio = (df["is_prohibited_true"] == 1).mean()
is_prohibited_pred_true_ratio = (df["is_prohibited_pred"] == 1).mean()

print(
    f"data/compliance_check_badcases.csv中is_prohibited_true为True的比例: {is_prohibited_true_ratio:.2%}"
)
print(
    f"data/compliance_check_badcases.csv中is_prohibited_pred为True的比例: {is_prohibited_pred_true_ratio:.2%}"
)
